﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using YouxinHelper.Helper;

namespace YouxinHelper.Youxin.Fans
{
    class FansStaticValue
    {
        static String fansAPI = "https://youxin.357.com/user/friends?type=followUser&orderKey={0}&searchuid={1}";

        public static string FansAPI { get => fansAPI; set => fansAPI = value; }

        /// <summary>
        /// 基础header
        /// </summary>
        /// <param name="FileUrl"></param>
        /// <returns></returns>
        public static WebHeaderCollection CurrencyWebHeader(String Uid,String Token)
        {
       

            WebHeaderCollection webHeaderCollection = new WebHeaderCollection();
            webHeaderCollection.Add("User-Agent", "youxin/4.0.3.6(Android;samsung 4.4.2)YouXin");
            webHeaderCollection.Add("token", Token);
            webHeaderCollection.Add("version", "4.0.3.6");
            webHeaderCollection.Add("machine", "88");
            webHeaderCollection.Add("appId", "1");
            webHeaderCollection.Add("platform", "android");
            webHeaderCollection.Add("Host", "youxin.357.com");
            webHeaderCollection.Add("Accept-Encoding", "gzip");
            webHeaderCollection.Add("uid", Uid);
            return webHeaderCollection;
        }

        public class ListItem
        {
            /// <summary>
            /// 
            /// </summary>
            public int uid { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string avatar { get; set; }
            /// <summary>
            /// 葑茗ノ凉音
            /// </summary>
            public string nickname { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int sex { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string manifesto { get; set; }
            /// <summary>
            /// 关注状态为500 未关注120
            /// </summary>
            public int relation { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string pendant { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int isplusv { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int relationFlag { get; set; }
        }

        public class Msg
        {
            /// <summary>
            /// 
            /// </summary>
            public List<ListItem> list { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string orderKey { get; set; }
            /// <summary>
            /// 当前数量:1102
            /// </summary>
            public string allCount { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int total { get; set; }
        }

        public class ExtData
        {
        }

        public class AppAlert
        {
        }

        public class Root
        {
            /// <summary>
            /// 
            /// </summary>
            public string RetSucceed { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string Succeed { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int code { get; set; }
            /// <summary>
            /// 成功
            /// </summary>
            public string Desc { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public Msg msg { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public ExtData extData { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public AppAlert AppAlert { get; set; }
        }

    }
}
